{if $smarty.get.print != 1}
  {include file="header.tpl"}
{else}
  {include file="headerPrint.tpl"}
{/if}
<form name="form1" action="" method="post">
<div class="contentDiv">
	<table align="center" cellspacing="0" cellpadding="2" style="border:1px solid;">
{if $smarty.get.print != 1}	
		<tr>
			<th><font size="3" color="red">{$l_bhatthipartyName}</font></th>
			<th align="right"><font size="3" color="red">{$l_fine}</font></th>
			<th align="right"><font size="3" color="red">{$l_amount}</font></th>
		</tr>
{else}
    <tr>
			<th>{$l_bhatthipartyName}</th>
			<th align="right">{$l_fine}</th>
			<th align="right">{$l_amount}</th>
		</tr>
{/if}
<tr>

		<tr>
	  	<td colspan="3"><hr/></td>
	  </tr>
		{section name="sec" loop=$bhatthiParty|@count}
		  <tr>
		  	<td>{$bhatthiParty[sec].name}</td>
		  	{if $total[sec].fine gt 0}
		    <td align="right">
		    <font color="green"><b>{$total[sec].fine|string_format:"%.0f"}</b>
		  	{else}
		    <td align="right"><font color="red"><b>{$total[sec].fine|string_format:"%.0f"}</b>
		  	</td>
	  		{/if}
	  		{if $total[sec].amount gt 0}
		  	<td align="right"><font color="green">
		    {$total[sec].amount|string_format:"%.0f"}
		    </td>
		    {else}
		    <td align="right"><font color="red"><b>
		    {$total[sec].amount|string_format:"%.0f"}</b>
		    {/if}
		  </tr>
		  <tr>
		  	<td colspan="3"><hr/></td>
		  </tr>
		{/section}
		<tr>
			<th align="right">{$l_total}</th>
			{if $fineTotal > 0}
			<th align="right">
			  <font color="green"><b>{$fineTotal|string_format:"%.0f"}</b></font>
			</th>
		  {else}
		  <th align="right">
			  <font color="red"><b>{$fineTotal|string_format:"%.0f"}</b></font>
			</th>
			{/if}
			{if $amountTotal > 0}
			<th align="green">
		    <font color="green"><b>{$amountTotal|string_format:"%.0f"}</b></font>
		  </th>
		  {else}
		  <th align="right">
		    <font color="red"><b>{$amountTotal|string_format:"%.0f"}</b></font>
		  </th>
		  {/if}
		  
		</tr>
				{if $smarty.get.print != 1}
    	<div align="right"><a href="bhatthiSummary.php?print=1"><font size="4" color="red">Summary Print</font></a></div>
    {else}
    &nbsp;
   {/if}
  </table>
</div>
{if $smarty.get.print != 1}
  {include file="footer.tpl"}
{/if}